$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER*1 TRIANGLE(15)
      INTEGER OLD_MODE
      INTEGER FG_GETMODE, FG_TESTMODE

      DATA TRIANGLE /#55,#55,#40, #1A,#A9,#00, #06,#A4,#00,
     +               #01,#90,#00, #00,#40,#00/

      CALL FG_INITPM
      IF (FG_TESTMODE(4,1) .EQ. 0) THEN
         STOP 'This program requires a 320 x 200 CGA graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(4)

      CALL FG_SETCOLOR(7)
      CALL FG_RECT(0,319,0,199)

      CALL FG_MOVE(156,101)
      CALL FG_DRWIMAGE(TRIANGLE,3,5)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
